<?php

namespace Catalog;

use Doctrine\ORM\Mapping as ORM;

/**
 * Catalog\UserPayment
 *
 * @ORM\Table(name="user_payment")
 * @ORM\Entity
 */
class UserPayment
{
    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var string $description
     *
     * @ORM\Column(name="description", type="string", length=255, nullable=false)
     */
    private $description;

    /**
     * @var float $cost
     *
     * @ORM\Column(name="cost", type="float", nullable=false)
     */
    private $cost;

    /**
     * @var datetime $createsAt
     *
     * @ORM\Column(name="creates_at", type="datetime", nullable=false)
     */
    private $createsAt;

    /**
     * @var Catalog\Users
     *
     * @ORM\ManyToOne(targetEntity="Catalog\Users")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="user_id", referencedColumnName="id")
     * })
     */
    private $user;



    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set description
     *
     * @param string $description
     * @return UserPayment
     */
    public function setDescription($description)
    {
        $this->description = $description;
        return $this;
    }

    /**
     * Get description
     *
     * @return string 
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Set cost
     *
     * @param float $cost
     * @return UserPayment
     */
    public function setCost($cost)
    {
        $this->cost = $cost;
        return $this;
    }

    /**
     * Get cost
     *
     * @return float 
     */
    public function getCost()
    {
        return $this->cost;
    }

    /**
     * Set createsAt
     *
     * @param datetime $createsAt
     * @return UserPayment
     */
    public function setCreatesAt($createsAt)
    {
        $this->createsAt = $createsAt;
        return $this;
    }

    /**
     * Get createsAt
     *
     * @return datetime 
     */
    public function getCreatesAt()
    {
        return $this->createsAt;
    }

    /**
     * Set user
     *
     * @param Catalog\Users $user
     * @return UserPayment
     */
    public function setUser(\Catalog\Users $user = null)
    {
        $this->user = $user;
        return $this;
    }

    /**
     * Get user
     *
     * @return Catalog\Users 
     */
    public function getUser()
    {
        return $this->user;
    }
}